home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 25 / Cream of the Crop 25.iso / bbs / randutl.zip / RANDMAX.DOC < prev    next >
Text File  |  1997-01-13  |  22KB  |  506 lines

  1.  
  2.   RANDMAX v2.e5 [.e6] by Steffen Pietsch
  3.  
  4.         1.1   Use
  5.         1.2   Version
  6.         1.3   Aim
  7.  
  8.         2.0   Usage
  9.         2.1   The Taxation
  10.         2.2   The Option File (RANDMAX.INI)
  11.         2.2.1     Section 1 (Friendly Codes)
  12.         2.2.2     Section 2 (Planetorders)
  13.         2.2.3     Section 3 (Special Codes)
  14.         2.3   Working Order At All
  15.         2.4   Using with WinPlan
  16.         
  17.         3.1   Formulas involved
  18.         3.2   nothing
  19.  
  20.         4.1   Known Bugs
  21.         4.2   Version History
  22.  
  23.         5.1   Remark
  24.         5.2   Comments
  25.         5.3   Disclaimer
  26.         5.4   Freeware
  27.  
  28.  
  29. * 1.1 Use:
  30. ==========
  31.  
  32.         RANDMAX <-c | -h | -n | -p | -r | -s | -t | -w> <dir> <option-file>
  33.         -cN     tax colonists up to N million with growth-method
  34.         -d      dump ini-file
  35.         -pN     RANDMAX only player N (1,2, ... 11)
  36.         -sN     sell after maximizing all supplies except N (default=1000)
  37.         -n      tax natives with growth method
  38.         -t      tax natives with safetax
  39.         -r      No Randomize; RANDMAX does all except randomizing the FC's
  40.         -w      WinPlan-compatibility-mode (works only with "-p" option!)
  41.  
  42.         -h or -? gives you a very short help for commandline
  43.         <dir>   subdirectory with your result (.RST) data
  44.  <option-file>  subdirectory with RANDMAX.INI file (if any is used)
  45.  
  46.  
  47. * 1.2 Version:
  48. ==============
  49.  
  50.         Since 1995/12/19 RANDMAX V2.e5 is available
  51.  
  52. * 1.3 Aim:
  53. ==========
  54.         Most of the commands that you give your planets are 'routine' 
  55.         stuff.  You maximize your factories, change your friendly codes 
  56.         (especially if you play against the Birds) and you tax your 
  57.         natives.  This needs a lot of time and very few thinking.  RANDMAX 
  58.         will do all these work for you completely automatic while you have 
  59.         still full control over your planets. 
  60.  
  61.         You can specify the build parameters for every planet seperately 
  62.         and you can also give general orders that work for every planet 
  63.         that has no order. 
  64.  
  65.         RANDMAX allows you to
  66.  
  67.         (1) Randomize all planets friendly codes (to prevent forgetting
  68.             this and be superspy-"attacked")
  69.  
  70.         (2) Maximize the factories, mines and defenceposts of your
  71.             planets.
  72.  
  73.         (3) Taxadjusting for natives and colonists
  74.  
  75.  
  76.         Note : Planets uses several files containing checksums and 
  77.         information about the planets version (to prevent cheating and 
  78.         planet version changes).  It is necessary for RANDMAX to find these 
  79.         files (otherwise the checksums would be wrong).  There are two ways 
  80.         to make sure that RANDMAX has this information.  First you can 
  81.         unpack the result, run planets and then RANDMAX.  Running planets 
  82.         before RANDMAX makes sure that all required files are generated. 
  83.         Second you can keep the data from your old turns in the player-
  84.         directory and you wont have problems.  Of course you need to run 
  85.         unpack before you run RANDMAX. 
  86.  
  87.         If RANDMAX can't find these files it will generate the files of its 
  88.         own and they will contain the shareware register information.  If 
  89.         you try to access the game directory with a registered planets 
  90.         version you'll get an error in planets. 
  91.  
  92.         
  93.  
  94. * 2.0 Usage
  95. ===========
  96.         The program is controlled by an option-file (RANDMAX.INI).
  97.         Here are the parts of the file :
  98.  
  99.         (1) Friendly codes
  100.             There may be some friendly codes that you don't want to
  101.             change (if you want to surrender ships or if you want to
  102.             prevent that allied ships attack your planet). In the first
  103.             section you can tell RANDMAX all friendly codes that it
  104.             shouldn't change.
  105.  
  106.         (2) Planetary orders
  107.             You can give each planet several orders (to build structures
  108.             and tax natives/colonists).
  109.             You can also give an universal order that works for every
  110.             planet that has no order.
  111.  
  112.         (3) Parameter section
  113.             There are a lot of parameters that allow you control the
  114.             native taxation.
  115.  
  116.  
  117.  
  118.  
  119.  
  120. * 2.1 The taxation
  121. ==================
  122.  
  123.         All natives and colonists on your planets have a certain
  124.         happiness which is a numerical value between -300 and 100.
  125.         In planets you see only a very rough estimation of the happiness
  126.         (100-90: happy, 89-70: calm, 69-50: unhappy, 49-40 : very angry,
  127.          39-20: rioting, below : fighting).
  128.  
  129.         Depending on the tax rate the happiness will rise or fall
  130.         (or remain constant). Planets shows you on the build screen
  131.         how the happiness will develop : A 'green' tax rate means that
  132.         the happiness will rise or remain constant, while a 'red' tax rate
  133.         indicates that the happiness will drop next turn.
  134.  
  135.         Because of some rounding mechanics it would be useful to tax
  136.         always at the highest 'green' rate, but the taxes will affect the
  137.         growth of the natives/colonists . The higher the tax rate the
  138.         slower the growth will be. You might want to find a way how
  139.         you can get better growth and still good taxes.
  140.  
  141.         Although the happiness change rate is influenced by a lot of
  142.         factors (number of clans, government, temperature) the current
  143.         happiness value won't affect the change. Furthermore the
  144.         tax influence is linear (i.e. if you tax at 20% it will have
  145.         twice the effect as if you tax with 10%).
  146.  
  147.         This means that (except roundings) it makes no difference for the
  148.         native happiness if you tax them one turn at 30% and then wait
  149.         2 turns with tax 0 or if you tax them 3 turns at 10%.
  150.         But in the latter case you will get less growth.
  151.  
  152.  
  153.         RANDMAX allows you to use both methods : Tax at 'safetax'
  154.         or try to optimize growth. Optimize growth means that RANDMAX
  155.         figures out how the happiness will change next turn.
  156.         If the happiness would reach 100 (the maximum) then RANDMAX
  157.         taxes as high as possible (depending on the number of your
  158.         colonists). If the happiness will remain below 100 then RANDMAX
  159.         sets the tax rate to 0 (maximum growth).
  160.         RANDMAX will switch to safetax as soon as the native population
  161.         approaches the maximum.
  162.  
  163.         Due to the roundings you lose about one percent tax every turn
  164.         you let your natives grow. That means that on planets with a
  165.         low safetax rate (1-3) it may be better to tax at safetax (those
  166.         low tax rates won't affect the growth that much).
  167.         On planets with a higher safetax the natives will grow much faster
  168.         and make up for this loss very soon. (You _do_ want those 15 million
  169.         insectoids or bovinoids, don't you ? :-)
  170.  
  171.         Note : If the happiness is below 70 the natives won't grow at all.
  172.         So RANDMAX will try to keep the happiness always at 70 or higher.
  173.         You can advice RANDMAX to overtax your natives so that the happiness
  174.         drops below 70 in the turn where RANDMAX taxes rigorously
  175.         (the natives won't grow anyway with 40% tax) but makes sure that
  176.         the natives reach 70 in the next turn (growth happens after
  177.         happiness adjusting). This gives you a longer 0% growth (especially
  178.         for avians).
  179.  
  180.  
  181.  
  182. * 2.2 The option file
  183. =====================
  184.  
  185. RANDMAX.INI consists of 3 sections.
  186. Between all these sections must be separated by ONE line starting with at least
  187. 3 asterisks ('*'). You can use the rest of the line for your comments.
  188.  
  189. An example RANDMAX.INI is included to your RANDMAX version.
  190.  
  191.  
  192. * 2.2.1 Section 1:      Save Friendly Codes
  193. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  194. The first section contains all friendly codes that RANDMAX shouldn't change.
  195. If you have no configuration file RANDMAX will keep the friendly codes
  196. 'NUK' and 'ATT' safe.
  197.  
  198.  
  199.  
  200. * 2.2.2 Section 2:      Maximize Orders
  201. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  202.  
  203. (1) general:
  204.         Syntax:
  205.         XXX oNNN oNNN ... oNNN
  206.  
  207.         XXX planetnumber
  208.         o   order (d, f, m, c, a, n, t, s, l)
  209.         NNN number (see description of the orders)
  210.             If you have no NNN then it is set to 1000 (for MAX)
  211.  
  212.         Maximum number of orders = 6
  213.  
  214.         There has to be exactly one planet per line!.
  215.  
  216.         You can give a GLOBALOrder with a planetnumber = 000
  217.         who works when NO special order is given.
  218.  
  219.         ATTENTION: As delimiter I only accept ONE Space (not two or more)
  220.         so an line such:
  221.         12  f m30 d          is NOT valid (two spaces between 12 and f)
  222.  
  223.         Two have nice-looking ini-files I recommend write leading zeros
  224.         for numbers below 100 (e.g. 013 001 051 ...)
  225.  
  226.  
  227. (2) order description:
  228.  
  229. A-Maximizeorders
  230.         d       maximize planetary defence up to NNN
  231.                 (e.g. d135 means maximize always the defence,
  232.                 when we are below 135)
  233.         f       maximize factories
  234.         m       maximize mines
  235.  
  236. B-Taxorders
  237.         n       adjust taxes for natives with growth-method
  238.                 (for NNN see at 3.section/code="NTH")
  239.                 AIM: is max growing and good tax-collect.
  240.                 * on other temperated world growth-method:
  241.                   - when they become happier than 100 then tax rigorous!
  242.                     (So don't worry about taxes of 55%)
  243.                     I adjust taxes that the natives next turn (with tax=0)
  244.                     again grow.
  245.                   - when the native population exceeds max-population then
  246.                     we can tax always with "safe"-method, I understand safe
  247.                     as let remain the happines, when it is over 70 else tax
  248.                     them the way they will reach happiness=70
  249.         t       tax natives always with safetax (I dont like happyness
  250.                 below calm-state) butYou can force it also down to
  251.                 a happiness of 40 (very angry, 39 then is rioting)
  252.                 (for NNN see 3.section/code="NTH")
  253.         c       adjust taxes for colonists
  254.                 NNN gives the minimum population in million
  255.                 (c2 means tax only when #colonists >= 2.000.000)
  256.                 - method is same as for natives (method "GROWTH")
  257.                 - Here the tax-always-with-safetax also works on desert
  258.                 and arctic worlds, because there we haven't any growth
  259.                 if NNN > 10 then it works as NNN for cth (see code "CTH")
  260.         a       same as order "c", but for low population;
  261.                 tax them with safetax
  262.                 with further check for too high taxes without getting
  263.                 also minimum one MC more for the last tax-percent.
  264.  
  265. C-Endorders (performed AFTER all other commands)
  266.         s       sell all supplies (to get the money) if no number is given
  267.                 sell all except NNN supplies if number NNN is given (def=1000)
  268.         l       disable the commandline-sell-option (see there)
  269.                 So set it e.g. on your Bovinoid-planet to safe your supplies
  270.                 for Merlins, fighter and fuel.
  271. E.G.
  272. 135 m30 d50 n c3    means: build mines up to 30 then defences up to 50
  273.                     and tax the natives and the colonists (colonists only
  274.                     if they are at least 3 millions).
  275.  
  276. While RANDMAX works you get
  277.       a "." for every planet with a special order
  278.       a "0" when with this planet the global-order works and
  279.       a "-" if for this planet no order works.
  280.  
  281.  
  282.  
  283. * 2.2.3 Section 3: special parameters
  284. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  285.         This section is only for special codes which ar working globally
  286.  
  287.         ctx     tax colonists with growth-method
  288.                 (optional is a second parameter NN for the million,
  289.                 see 'c' option in section 2)
  290.         ntx     tax natives with growth-method
  291.         cts     tax colonists with safetax
  292.         nts     tax natives with safetax
  293.         nth     (after reaching the maximum population the tax-modus change
  294.                 automatically to safe-tax.) Now you can say that it not only
  295.                 tax safe (means: stay at the current happiness) but you can
  296.                 declare a wished happiness (the number NNN say this)
  297.                 If you omit the number after "nth" then default=70
  298.         cth     same as "nth" for colonists after reaching the maximum
  299.                 population (number default=70)
  300.         nt%     Gives the wished percentage of MC which has to be collected
  301.                 with the last percent of native-tax. When this percentage
  302.                 isn't reached then we don't take the last percent of taxes.
  303.                 Default is 0 % (that means take allways the last tax-%)
  304.         mnt     max natives-tax (in newer host only 20% or below is allowed
  305.                 for cyborgs), default is 100.
  306.         mct     max colonist-tax                              (default=100%)
  307.         mmc     max MC's allowed to collect (host 3.2)
  308.         mnc     min colonist (clans) before we tax natives    (default=1 clan(!))
  309.         mnn     min natives (clans) before we tax natives     (default=1 clan)
  310.         mnm     min MC to collect before it's worth to tax natives (default=1 MC)
  311.         hca     happychange includes avianbonus (+10). For adjusting of taxes
  312.                 I have this in mind, BUT here I mean the check IF I tax or not,
  313.                 I have the opinion, that also the avians should get the chance
  314.                 to grow(!). When hca is on then also for this check I take
  315.                 the normal happychange+avianbonus, and that's why almost you
  316.                 will tax them (they would have only every fourth turn the chance
  317.                 to grow). I recommend let hca away.
  318.         not     overtax natives  when using growth-method, normally when RANDMAX
  319.                 taxes, you will get a happiness of 70 for Your natives, and next
  320.                 turn when they are again 70+HappyChange they wil again grow. Now
  321.                 I give you the chance to overtax the natives below 70
  322.                 (below to 70-HappyChange), so next turn Your natives will (with
  323.                 0% taxrate) become happier to (70-HappyChange)+HappyChange=70
  324.                 and they ALSO will grow. For safety I tax only 71-HappyChange.
  325.         cot     overtax colonists when using -"-
  326.         rno     Randomize NO; RANDMAX does all except randomizing the planetary
  327.                 friendly codes
  328.         wpl     Same as "-w" option, player plays with WinPlan
  329.  
  330.  
  331. * 2.3 Working Order at ALL:
  332. ===========================
  333.  
  334.         1. The main order is allways the special planet-order
  335.         Only if this didn't work
  336.         2. The 000-order.
  337.         Only if this didn't work
  338.         3. Global orders from command-line or from the 3rd section.
  339.  
  340.         !!! commands from the 3rd section OVERWRITES command-line-orders !!!
  341.  
  342.  
  343. * 2.4 Using with WinPlan
  344. ========================
  345.  
  346.        Since version 2.e3 You can use RANDMAX with WinPlan.
  347.        Because WinPlan use different control-structures, you can only
  348.          randomize/maximize one player at once.
  349.        So if You are player7 use:
  350.              RANDMAX -w -p7 game1
  351.        For using RANDMAX, you do not have to leave WinPlan but you must 
  352.        leave the specified player.
  353.  
  354.  
  355. * 3.1 Involved Formulas
  356. =======================
  357.  
  358. Following formulas were found in the very well documented PHost edition.
  359.  
  360. Mathematical Notation
  361. ---------------------
  362.  
  363.            ABS(X)      Absolute value of X
  364.            ERND(X)     Round floating point to nearest integer. Values that
  365.                        have a fractional part of exactly 0.5 are rounded to
  366.                        the nearest even integer (e.g., 8.5-->8, 9.5-->10)
  367.            MAX(A,B)    Maximum of A and B
  368.            MIN(A,B)    Minimum of A and B
  369.            SQRT(X)     Square root of X
  370.            TRUNC(X)    Truncate floating point by discarding fractional part
  371.  
  372.      TargetTemp = 100 if planet is Crystal and cfg_CrystalsLikeDesert is ON
  373.                 = 50
  374.      TempDivisor = 66 if planet is Crystal and cfg_CrystalsLikeDesert is ON
  375.                  = 33
  376.      CHAPPY change = 10 - SQRT(CLANS/10000.0)
  377.                         - ABS(TEMP-TargetTemp)/TempDivisor
  378.                         - (M+F)/300
  379.                         - CTAX*0.8
  380.  
  381.      NHAPPY change = 5 + NATGOV/2 - SQRT(NATCLANS/10000.0) - (M+F)/200
  382.                        - NTAX*0.85
  383.      If natives are Avian,
  384.         NHAPPY change = NHAPPY change + 10
  385.  
  386.      MC from colonist tax = 0, if CHAPPY < 40
  387.                           = (CLANS * CTAX * 5 + 2500) / 5000, if CHAPPY >= 40
  388.  
  389.      MC from native tax   = 0, if NHAPPY < 40 or natives are Amorphous
  390.                           = MIN((NATCLANS * NATGOV * NTAX + 2500) / 5000, CLANS)
  391.  
  392.                  MC = MC * 2 if natives are Insectoid
  393.                  MC = (MC * cfg_TAX_RATE + 50) / 100
  394.  
  395.      For rounding TIM uses the ERND-function. (7.5 to 8 and 6.5 to 6).
  396.  
  397.  
  398. * 4.1 Known but not yet repaired BUGs:
  399. ======================================
  400.  
  401.        NONE
  402.  
  403.  
  404. * 4.2 Changes:
  405. ==============
  406.  
  407. v2.e6: corrected notused "cth" while safe-tax-method
  408. v2.e5: prevent rounding-failures with post-test of the happychange
  409. v2.e4: MaxOrdersAvail now limited to 20 to save memory;
  410.        now also with Dump-option the comments after the planetorders
  411.        are preserved (up to 40 characters);
  412. v2.e3: BUG-fix (nt% did not work); new WinPlan-switch "-w"
  413. v2.e2: only BUG-fix
  414. v2.e1: 3rd-section-code mmc MaxMCfor host3.2-compatibility;
  415.        now up to 100 safe fc's possible; 3.2-special codes implemented
  416. v2.e0: dump-option, now up to 20 orders possible;
  417.        now coments are allowed in ini-file
  418. v2.d4: internal release
  419. v2.d3: release of v2.d2 ; a40 and t40 now works also when population
  420.        not yet have reached the maximum-population (or if it decreases like
  421.        natives under the oppression of cyborgs)
  422. v2.d2: BUG-fix for "cth" and "nth"; New code "cda" for CrystalDesertAdvantage
  423. v2.d1: New codes "nth","cth" (also usable for Lizard-Hiss)
  424. v2.d0: Planets shows false tax-incomes with insectoids; change my code
  425. v2.C4: BUG-fix, also with this "nt% Number" when after Number nothing came
  426.        then it would go in an unterminated loop - it would hang. (FIXED)
  427. v2.C3: BUG-fix, when you had specified nt% and had not enough colonist,
  428.        RANDMAX divided with zero and -> Runtime error. (FIXED)
  429.        New switch for NoRandomizing (-r or code='rno')
  430. v2.C2: added output-feature. Now you can redirect all written output to a file
  431.        e.g. with: RANDMAX game1 >rand.log         You will get nothing on
  432.        the screen, but all output in the rand.log-file. (Nice for using in
  433.        automated batch-modes)
  434. v2.C1: now initializing of player-gamedir with '.', in former times, when
  435.        you played all in one directory (without extra gamedir) RANDMAX
  436.        searched in the dir \ for any files that means in the root-dir.
  437. v2.C0: 8 new special codes
  438. v2.B2: now multiplayer-option (-pN like -p3 for Bird) works for shareware
  439.        and registered planets-users.
  440. v2.B1: same as v2.B0, only register-check now works in right order (it
  441.        was something in trouble with the if-then-then-else-...)
  442. v2.B0: new third section with special codes (= three-letter-codes)
  443.        (ctx,ntx,cts,nts,ct%,nt%)
  444. v2.A1-4: new taxorder a; take insectoid-bonus in min; better roundings
  445. v2.A:  new orders s and l for selling supplies
  446. v2.9:  taxadjusting like any other order in RANDMAX.INI
  447. v2.8:  with taxadjusting (until now only global on command-line)
  448. v2.7b: Only one byte changed, but without it it maximized false
  449. v2.7a: Fixed two bugs: 1. gets negative amounts of money and supplies
  450.                           when you already have more Units than allowed.
  451.                        2. Did not sell supplies for getting enough cash
  452.                           to buy further units
  453. v2.7:  Now support of Maxnumbers of factories, mines and defenses
  454. v2.6:  <intern>
  455. v2.5:  Make RANDMAX.EXE independent from my program makegood.exe
  456.  
  457. 24.decembre 1993: Version v2.04 is the first public version
  458.  
  459.  
  460.  
  461. * 5.1 REMARK:
  462. =============
  463.        Remember that if you use a registered version of planets.exe then make
  464.        sure that you run planets.exe once BEFORE RANDMAX (vputil has the same
  465.        problem) OR you use only sweep.bat instead of clearing the whole
  466.        game-directory.
  467.  
  468.        If You compare the tax-results with other utilities use
  469.        plantabl (by Thomas Voigt) or planets (by Tim Wisseman).
  470.  
  471.        !!! VPutil have rounding failures, if You are low on colonists,
  472.            so it can happen that You tax one percent to low !!!
  473.  
  474.  
  475. * 5.2 END:
  476. ==========
  477. Please tell me if the program fails. Just zip up all player files
  478. in the player directory and email them uuencoded to me.
  479. My email adress is neffets@cs.tu-berlin.de
  480.  
  481.  
  482.  
  483. * 5.3 Disclaimer:
  484. =================
  485.  
  486.     This program is provided 'as is', with no explicit or implied
  487.     warranty. I disclaim all warranties with regard to this software,
  488.     including all warranties of merchantability and fitness. In no
  489.     event shall the author be liable for any damages resulting from
  490.     the use of this program.
  491.  
  492. * 5.4 FREEWARE:
  493. ===============
  494.  
  495.     This program is free for every person. Please give the program
  496.     to all tour friends.
  497.     (This means you are not allowed to take money or other benefits
  498.      for RANDMAX!!!)
  499.  
  500.  
  501.  
  502. Steffen <neffets@cs.tu-berlin.de>
  503.  
  504.                          ---------- *** ----------
  505.  
  506.